import request from '@/utils/request'

// 获取所有省天气、地图、搜索
export const getProvinceWeatherApi = () => request.get('/pc')
// 获取省详细天气
export const getProvinceDetailWeatherApi = province =>
  request.get(`/paw/${province}`)
// 获取省24小时天气
export const getProvinceADatyWeatherApi = province =>
  request.get(`/24hData/p/${province}`)
// 获取省一周天气
export const getProvinceWeekWeatherApi = province =>
  request.get(`/7d/p/${province}`)
// 获取省下面城市天气
export const getCityWeatherApi = province => request.get(`/pCity/${province}`)
// 获取城市详细天气
export const getCityDetailWeatherApi = ({ province, city }) =>
  request.post('/cities', {
      provinceName: province,
      cityName: city
  })
// 获取城市24小时天气
export const getCityADatyWeatherApi = ({ province, city }) =>
  request.post('/24hData/c', {
    provinceName: province,
    cityName: city
  })
// 获取城市一周天气
export const getCityWeekWeatherApi = ({ province, city }) =>
  request.post('/7d/c', {
    provinceName: province,
    cityName: city
  })
